options(echo = FALSE)
source( "Rs/polyDataRead.R" )
load.data(INCLUDE_ALL="All",collapse.groups=FALSE)
source("Rs/demographics.R")
compute.demographics(P)

rownames(P) = P$personID

ban = read.csv( "banList.csv", stringsAsFactors=FALSE )
ban = ban[c(1,4,5,6,7)]	
 
P = merge( P, ban, by="personID", all.x=TRUE )

P$Paid = ifelse( P$Paid=="" | P$Paid==" ", "no", P$Paid )
P$matchString = ifelse( P$matches < 4, "You have 3 or fewer matches at this time.  You might consider changing your profile or checking it for errors.  If you decide not to come then please let us know and we will refund your money.", 
		ifelse( P$matches < 20, "You currently have at least 4 potential matches.", "You currently have a lot of potential matches." ) )

P = subset( P, In != "no" & In != "n" )

save.file(P, collapse.groups=TRUE, file="allRegistered.csv", 
				orderBy=c("matches","gender1", "lookGender1") )

cat( "allRegistered has full list of registered folks\n" )


